open(BUFF1,"result_barcode");
open(BUFF2,"result_frma");
open(BUFF3,"result_present_absent");
open(BUFF4,"result_MAD");
while($line=<BUFF1>)
{
	chomp($line);
	@array = split(/\t/,$line);
	$hash{$array[0]} = $line;
}
while($line=<BUFF2>)
{
        chomp($line);
        @array = split(/\t/,$line);
        if(exists($hash{$array[0]}))
	{
		$hash{$array[0]} = $hash{$array[0]}."\t".$array[1];
	}
	else
	{
		print "something wrong file2 spiked in $line\n";
	}
}
while($line=<BUFF3>)
{
        chomp($line);
        @array = split(/\t/,$line);
        if(exists($hash{$array[0]}))
        {
                $hash{$array[0]} = $hash{$array[0]}."\t".$array[1];
        }
	 else
        {
                print "something wrong file3 present absent $line\n";
        }

}
while($line=<BUFF4>)
{
        chomp($line);
        @array = split(/\t/,$line);
        if(exists($hash{$array[0]}))
        {
                $hash{$array[0]} = $hash{$array[0]}."\t".$array[1];
        }
	 else
        {
                print "something wrong file4 MAD $line\n";
        }

}


open(WRBUFF,">final_combined");
while(($key,$value) = each %hash)
{
	print WRBUFF $value."\n";
}
